#usr/bin/python

import re
import codecs
from os.path import realpath, dirname, join

myPath = realpath(dirname(__file__))

docFile = codecs.open(join(myPath, '../../doc/symbide-doc.html'), 'r', 'utf-8')
doc = docFile.read()
docFile.close()

docContentPattern = re.compile(r'(?<=<body>).*(?=</body>)', re.DOTALL)
docContent = docContentPattern.search(doc).group()

f = codecs.open(join(myPath, 'body_documentation.xml'), 'w', 'utf-8')
f.write(docContent)
f.close()



